In [1]:
import pandas as pd
pd.options.display.max_columns = 50

pd.options.mode.chained_assignment = None 

import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import plotly.express as px # Instalation : https://plotly.com/python/getting-started/, also check the jupyterlab extra guide.

Soil 2018 EDA¶

In [2]:
df = pd.read_csv('LUCAS-SOIL-2018-v2/LUCAS-SOIL-2018.csv')
df
Out[2]:
Depth POINTID pH_CaCl2 pH_H2O EC OC CaCO3 P N K OC (20-30 cm) CaCO3 (20-30 cm) Ox_Al Ox_Fe NUTS_0 NUTS_1 NUTS_2 NUTS_3 TH_LAT TH_LONG SURVEY_DATE Elev LC LU LC0_Desc LC1_Desc LU1_Desc
0 0-20 cm 47862690 4.1 4.81 8.73 12.4 3 < LOD 1.1 101.9 NaN NaN NaN NaN AT AT1 AT11 AT113 47.150238 16.134212 06-07-18 291 C23 U120 Woodland Other coniferous woodland Forestry
1 0-20 cm 47882704 4.1 4.93 5.06 16.7 1 < LOD 1.3 51.2 NaN NaN NaN NaN AT AT1 AT11 AT113 47.274272 16.175359 06-07-18 373 C21 U120 Woodland Spruce dominated coniferous woodland Forestry
2 0-20 cm 47982688 4.1 4.85 12.53 47.5 1 12.3 3.1 114.8 NaN NaN NaN NaN AT AT1 AT11 AT113 47.123260 16.289693 02-06-18 246 C33 U120 Woodland Other mixed woodland Forestry
3 0-20 cm 48022702 5.5 5.80 21.10 28.1 3 < LOD 2 165.8 NaN NaN NaN NaN AT AT1 AT11 AT113 47.245693 16.357506 06-07-18 305 C22 U120 Woodland Pine dominated coniferous woodland Forestry
4 0-20 cm 48062708 6.1 6.48 10.89 19.4 2 < LOD 2.2 42.1 NaN NaN NaN NaN AT AT1 AT11 AT113 47.296372 16.416782 05-07-18 335 C22 U120 Woodland Pine dominated coniferous woodland Forestry
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
18979 0-20 cm 32643634 6.0 6.13 91.40 51.4 2 92.2 5.3 1036.9 NaN NaN NaN NaN UK UKN UKN1 UKN11 54.713343 -6.563749 24-07-18 50 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
18980 0-20 cm 32703676 4.9 5.14 51.78 73.9 NaN 81.6 6.9 225 NaN NaN NaN NaN UK UKN UKN1 UKN12 55.091488 -6.625119 02-08-18 34 B55 U111 Cropland Temporary grassland Agriculture (excluding fallow land and kitchen...
18981 0-20 cm 32783608 5.5 5.94 22.40 63.7 1 101.9 6.7 569.5 NaN NaN NaN NaN UK UKN UKN1 UKN14 54.515104 -6.259448 18-06-18 50 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
18982 0-20 cm 32783636 5.3 5.90 10.42 38.3 1 7.3 3.1 1907.9 NaN NaN NaN NaN UK UKN UKN1 UKN13 54.759266 -6.358608 05-06-18 122 E20 U370 Grassland Grassland without tree/shrub cover Residential
18983 0-20 cm 33023682 4.7 4.97 141.70 98.7 1 33.7 10.1 231.1 NaN NaN NaN NaN UK UKN UKN1 UKN12 55.208730 -6.156597 28-06-18 143 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...

18984 rows × 27 columns

In [3]:
target_var = 'K' # Change the target Variable

df_plot = df.loc[df[target_var].str.isnumeric().fillna(False)]
df_plot[target_var] = df_plot[target_var].astype(float)

fig = px.scatter_geo(df_plot.groupby('Depth').sample(500,replace=True).drop_duplicates(subset=['POINTID']),lat='TH_LAT',lon='TH_LONG',
                    color='Depth',size=target_var)
fig.update_layout(geo_scope='europe')


# Set a scale factor for marker size based on CaCO3 values
fig.update_layout(height=700, width=1200)
fig

# For each country there are multiple data points collected
In [4]:
df['SURVEY_DATE'] = pd.to_datetime(df['SURVEY_DATE'],format="%d-%m-%y")
df['SURVEY_DATE'].value_counts().plot()
# Most data collected in spring/summer
Out[4]:
<AxesSubplot:xlabel='SURVEY_DATE'>
In [5]:
country_codes = pd.read_html('https://www.iban.com/country-codes')[0]
country_mapping = dict(zip(country_codes['Alpha-2 code'],country_codes['Country']))
df['COUNTRY'] = df['NUTS_0'].map(country_mapping)
In [6]:
# See Numeric Average per LC1_Desc
list_variables = ['pH_CaCl2','pH_H2O','EC','OC','CaCO3','P','N','K']
for var in list_variables:
    try :
        df_temp = df.loc[df[var].str.isnumeric().fillna(False)]
        df_temp[var] = df_temp[var].astype(float) 
    except :
        df_temp = df.copy()
    display(df_temp.groupby('LC1_Desc')[[var]].describe().sort_values((var,'mean')))
pH_CaCl2
count mean std min 25% 50% 75% max
LC1_Desc
Lichens and Moss 3.0 3.600000 0.100000 3.5 3.550 3.60 3.650 3.7
Peatbogs 25.0 3.708000 0.721642 2.9 3.300 3.50 4.100 5.9
Spruce dominated coniferous woodland 801.0 3.978027 0.912519 2.7 3.400 3.70 4.200 7.4
Spruce dominated mixed woodland 736.0 4.141033 0.900673 2.7 3.600 3.90 4.400 7.4
Other coniferous woodland 265.0 4.191698 1.294220 2.8 3.400 3.70 4.300 7.6
... ... ... ... ... ... ... ... ...
Tomatoes 14.0 7.178571 0.757708 4.7 7.225 7.45 7.500 7.6
Other citrus fruit 10.0 7.350000 0.302765 6.9 7.100 7.45 7.575 7.7
Cotton 40.0 7.370000 0.335276 6.5 7.300 7.50 7.600 7.8
Oranges 18.0 7.394444 0.309596 6.3 7.400 7.40 7.575 7.7
Inland fresh running water 4.0 7.550000 0.129099 7.4 7.475 7.55 7.625 7.7

65 rows × 8 columns

pH_H2O
count mean std min 25% 50% 75% max
LC1_Desc
Lichens and Moss 3.0 4.296667 0.187705 4.13 4.1950 4.260 4.3800 4.50
Peatbogs 25.0 4.496000 0.586593 3.70 4.1400 4.240 4.8500 6.16
Spruce dominated coniferous woodland 801.0 4.678502 0.817903 3.34 4.1100 4.480 4.9300 8.05
Spruce dominated mixed woodland 736.0 4.812880 0.770649 3.38 4.3000 4.590 5.1050 7.79
Rocks and stones 2.0 4.825000 0.657609 4.36 4.5925 4.825 5.0575 5.29
... ... ... ... ... ... ... ... ...
Tomatoes 14.0 7.757143 0.794156 5.22 7.7425 7.950 8.0425 8.41
Oranges 18.0 7.842222 0.411290 6.40 7.7275 7.925 8.0500 8.22
Cotton 40.0 7.883500 0.391031 6.91 7.6875 8.000 8.1800 8.41
Other citrus fruit 10.0 7.887000 0.410069 6.98 7.6800 8.045 8.1925 8.26
Inland fresh running water 4.0 8.117500 0.268499 7.85 8.0000 8.065 8.1825 8.49

65 rows × 8 columns

EC
count mean std min 25% 50% 75% max
LC1_Desc
Sand 5.0 6.223000 3.812171 1.66 4.0200 5.280 9.1150 11.04
Rocks and stones 2.0 6.540000 3.634529 3.97 5.2550 6.540 7.8250 9.11
Pine dominated mixed woodland 592.0 9.772162 10.831449 1.77 3.8575 6.135 11.8975 145.60
Pine dominated coniferous woodland 1263.0 9.782930 14.334964 1.47 3.7500 5.930 11.7250 235.00
Clovers 42.0 10.986905 5.116483 4.68 7.4750 9.245 14.3800 27.83
... ... ... ... ... ... ... ... ...
Other bare soil 628.0 30.330852 54.796812 2.68 12.1300 16.765 22.5800 553.18
Other fresh vegetables 44.0 31.367500 43.747090 5.63 13.9125 19.610 28.4675 276.00
Pear fruit 20.0 40.297500 62.225854 4.93 14.1375 21.980 28.7125 273.24
Other citrus fruit 10.0 47.180000 54.265183 15.61 18.0700 26.750 40.8725 190.76
Salines 1.0 377.000000 NaN 377.00 377.0000 377.000 377.0000 377.00

65 rows × 8 columns

OC
count mean std min 25% 50% 75% max
LC1_Desc
Other non-permanent industrial crops 1.0 5.000000 NaN 5.0 5.00 5.0 5.00 5.0
Strawberries 1.0 6.000000 NaN 6.0 6.00 6.0 6.00 6.0
Cotton 4.0 9.750000 3.947573 4.0 9.25 11.0 11.50 13.0
Other fresh vegetables 4.0 9.750000 2.061553 8.0 8.00 9.5 11.25 12.0
Mix of cereals 8.0 9.750000 3.693624 6.0 7.75 9.0 10.25 18.0
Potatoes 10.0 9.900000 2.330951 7.0 8.25 9.5 11.75 14.0
Other citrus fruit 1.0 11.000000 NaN 11.0 11.00 11.0 11.00 11.0
Rice 1.0 11.000000 NaN 11.0 11.00 11.0 11.00 11.0
Nuts trees 9.0 11.333333 5.431390 4.0 6.00 13.0 15.00 19.0
Tomatoes 1.0 12.000000 NaN 12.0 12.00 12.0 12.00 12.0
Rye 24.0 12.791667 6.460443 5.0 9.00 10.0 16.00 33.0
Vineyards 27.0 14.296296 7.231421 3.0 11.00 13.0 18.00 38.0
Sugar beet 16.0 14.375000 4.631414 9.0 11.00 12.5 18.00 26.0
Triticale 11.0 14.909091 9.235308 5.0 8.50 13.0 18.50 32.0
Oats 28.0 15.035714 14.061985 3.0 8.00 12.0 18.00 80.0
Other bare soil 59.0 15.440678 8.888720 3.0 8.50 13.0 22.00 42.0
Oranges 1.0 16.000000 NaN 16.0 16.00 16.0 16.00 16.0
Barley 97.0 16.237113 15.376371 4.0 9.00 14.0 18.00 125.0
Sunflower 33.0 16.424242 7.656820 5.0 12.00 16.0 19.00 41.0
Olive groves 47.0 16.553191 12.109659 4.0 9.00 12.0 21.00 69.0
Dry pulses 17.0 17.764706 10.425506 6.0 12.00 15.0 22.00 49.0
Common wheat 166.0 17.933735 14.454583 3.0 11.00 15.0 19.00 116.0
Maize 74.0 18.148649 8.148758 6.0 12.25 17.0 22.00 55.0
Soya 4.0 18.250000 8.845903 11.0 13.25 15.5 20.50 31.0
Other fibre and oleaginous crops 11.0 18.272727 8.580104 9.0 12.00 16.0 22.50 37.0
Durum wheat 23.0 18.478261 24.009221 8.0 10.00 12.0 16.50 127.0
Rape and turnip rape 44.0 19.886364 8.556830 6.0 14.00 18.0 26.00 41.0
Lucerne 21.0 20.714286 10.555297 6.0 17.00 18.0 29.00 49.0
Other Leguminous and mixtures for fodder 8.0 21.375000 8.667468 11.0 14.50 21.5 24.25 36.0
Other cereals 2.0 22.000000 1.414214 21.0 21.50 22.0 22.50 23.0
Other root crops 4.0 22.250000 14.032700 11.0 11.75 18.5 29.00 41.0
Apple fruit 2.0 22.500000 2.121320 21.0 21.75 22.5 23.25 24.0
Other artificial areas 4.0 22.750000 8.693868 12.0 18.00 23.5 28.25 32.0
Spontaneously re-vegetated surfaces 73.0 22.849315 23.064927 4.0 11.00 15.0 23.00 131.0
Clovers 2.0 23.000000 2.828427 21.0 22.00 23.0 24.00 25.0
Arable land (only PI) 1.0 24.000000 NaN 24.0 24.00 24.0 24.00 24.0
Other fruit trees and berries 4.0 24.750000 18.062392 5.0 11.75 26.0 39.00 42.0
Cherry fruit 3.0 25.333333 19.295941 10.0 14.50 19.0 33.00 47.0
Grassland with sparse tree/shrub cover 54.0 38.185185 57.253516 6.0 17.50 27.0 42.25 428.0
Grassland without tree/shrub cover 265.0 45.075472 55.853654 6.0 19.00 30.0 50.00 434.0
Inland fresh running water 1.0 46.000000 NaN 46.0 46.00 46.0 46.00 46.0
Shrubland without tree cover 46.0 51.086957 44.605842 4.0 22.25 32.5 69.75 197.0
Shrubland with sparse tree cover 27.0 52.962963 86.081125 9.0 14.00 25.0 55.50 447.0
Non built-up linear features 2.0 54.500000 72.831998 3.0 28.75 54.5 80.25 106.0
Temporary grassland 32.0 55.250000 100.268350 8.0 16.75 24.0 33.25 463.0
Broadleaved woodland 188.0 57.031915 80.402657 3.0 19.00 31.0 56.00 519.0
Pine dominated coniferous woodland 128.0 73.039062 110.486640 4.0 17.00 37.0 68.50 525.0
Pine dominated mixed woodland 71.0 86.154930 140.332121 7.0 19.00 28.0 64.50 527.0
Other coniferous woodland 24.0 99.458333 124.031896 8.0 35.75 54.0 113.75 480.0
Spruce dominated mixed woodland 59.0 109.576271 112.082052 13.0 38.50 60.0 133.00 461.0
Other mixed woodland 37.0 136.864865 166.644192 11.0 24.00 48.0 151.00 502.0
Spruce dominated coniferous woodland 58.0 143.724138 145.632413 4.0 39.25 70.0 226.75 493.0
Inland marshes 1.0 246.000000 NaN 246.0 246.00 246.0 246.00 246.0
Peatbogs 1.0 336.000000 NaN 336.0 336.00 336.0 336.00 336.0
CaCO3
count mean std min 25% 50% 75% max
LC1_Desc
Salines 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Inland salty water bodies 1.0 3.000000 NaN 3.0 3.00 3.0 3.00 3.0
Rice 1.0 3.000000 NaN 3.0 3.00 3.0 3.00 3.0
Peatbogs 15.0 3.733333 1.709915 1.0 3.00 3.0 5.00 6.0
Spruce dominated coniferous woodland 518.0 5.054054 24.807206 1.0 1.00 1.0 2.00 412.0
... ... ... ... ... ... ... ... ...
Cherry fruit 10.0 223.600000 246.162638 5.0 19.00 122.5 385.75 715.0
Other non-permanent industrial crops 4.0 235.250000 289.300737 5.0 83.00 139.5 291.75 657.0
Nuts trees 99.0 261.363636 213.322237 1.0 74.00 243.0 386.50 759.0
Olive groves 382.0 277.350785 222.514047 1.0 47.50 264.5 448.75 831.0
Permanent industrial crops 8.0 282.250000 259.019994 1.0 79.75 268.5 435.25 698.0

62 rows × 8 columns

P
count mean std min 25% 50% 75% max
LC1_Desc
Permanent industrial crops 1.0 10.000000 NaN 10.0 10.00 10.0 10.00 10.0
Nurseries 1.0 19.000000 NaN 19.0 19.00 19.0 19.00 19.0
Other citrus fruit 1.0 20.000000 NaN 20.0 20.00 20.0 20.00 20.0
Other Leguminous and mixtures for fodder 6.0 20.833333 12.528634 12.0 15.25 17.0 18.00 46.0
Non built-up linear features 3.0 21.333333 11.015141 10.0 16.00 22.0 27.00 32.0
Apple fruit 1.0 22.000000 NaN 22.0 22.00 22.0 22.00 22.0
Lucerne 10.0 22.100000 13.641847 10.0 12.50 16.5 25.75 48.0
Shrubland without tree cover 14.0 22.285714 13.088037 11.0 13.00 21.0 27.00 61.0
Grassland with sparse tree/shrub cover 19.0 23.315789 19.689401 4.0 12.00 15.0 24.00 80.0
Other coniferous woodland 22.0 23.454545 14.005874 10.0 12.00 20.0 33.00 67.0
Broadleaved woodland 112.0 24.848214 19.639641 2.0 13.00 19.0 29.25 124.0
Spruce dominated coniferous woodland 62.0 25.274194 17.000645 10.0 14.00 20.0 29.75 101.0
Cotton 3.0 25.333333 10.016653 14.0 21.50 29.0 31.00 33.0
Sunflower 36.0 25.638889 14.652455 9.0 15.75 22.0 30.50 86.0
Durum wheat 18.0 25.833333 12.391885 11.0 15.25 21.0 35.00 49.0
Shrubland with sparse tree cover 15.0 26.133333 18.275146 11.0 12.50 22.0 32.50 81.0
Rice 2.0 26.500000 7.778175 21.0 23.75 26.5 29.25 32.0
Pine dominated coniferous woodland 84.0 27.583333 18.555815 10.0 16.75 24.0 32.25 150.0
Other artificial areas 7.0 28.571429 18.164591 12.0 14.50 24.0 36.50 62.0
Spruce dominated mixed woodland 50.0 28.680000 24.121664 10.0 13.00 23.0 35.00 158.0
Temporary grassland 24.0 29.208333 15.463784 10.0 17.75 25.0 37.25 74.0
Other root crops 2.0 29.500000 21.920310 14.0 21.75 29.5 37.25 45.0
Dry pulses 10.0 29.700000 20.822264 10.0 14.50 21.0 38.75 73.0
Pine dominated mixed woodland 21.0 30.714286 18.687276 11.0 16.00 23.0 45.00 75.0
Soya 4.0 30.750000 22.425804 15.0 15.75 22.5 37.50 63.0
Inland marshes 3.0 32.000000 16.462078 22.0 22.50 23.0 37.00 51.0
Vineyards 30.0 32.400000 17.562892 6.0 18.00 31.0 43.75 71.0
Other mixed woodland 27.0 32.518519 32.211286 11.0 16.00 23.0 34.00 172.0
Clovers 5.0 32.800000 23.381617 14.0 17.00 18.0 49.00 66.0
Other bare soil 45.0 33.533333 23.475906 5.0 17.00 26.0 39.00 119.0
Other cereals 4.0 34.000000 13.735599 21.0 26.25 31.0 38.75 53.0
Spontaneously re-vegetated surfaces 60.0 34.983333 31.385245 10.0 14.75 26.5 39.25 174.0
Olive groves 28.0 35.892857 34.821597 10.0 13.00 22.0 39.50 143.0
Grassland without tree/shrub cover 231.0 37.311688 42.409677 3.0 16.00 25.0 47.00 515.0
Barley 94.0 37.861702 24.836498 10.0 17.25 32.5 51.75 142.0
Nuts trees 7.0 38.428571 22.066998 12.0 19.00 46.0 51.50 70.0
Oats 25.0 38.840000 28.430735 11.0 18.00 27.0 50.00 113.0
Other fruit trees and berries 10.0 40.000000 27.434771 11.0 19.25 32.5 54.25 90.0
Rape and turnip rape 41.0 40.170732 28.504300 11.0 19.00 36.0 49.00 160.0
Common wheat 145.0 40.379310 25.794613 10.0 22.00 33.0 52.00 140.0
Strawberries 1.0 44.000000 NaN 44.0 44.00 44.0 44.00 44.0
Triticale 14.0 44.357143 33.931168 14.0 21.00 26.5 59.50 131.0
Rye 15.0 45.600000 32.370180 10.0 21.50 33.0 62.50 126.0
Sugar beet 7.0 47.428571 15.873008 25.0 37.00 48.0 56.50 72.0
Other fibre and oleaginous crops 1.0 49.000000 NaN 49.0 49.00 49.0 49.00 49.0
Pear fruit 1.0 54.000000 NaN 54.0 54.00 54.0 54.00 54.0
Maize 73.0 54.917808 43.965818 8.0 26.00 44.0 72.00 250.0
Other fresh vegetables 5.0 65.000000 44.938847 21.0 29.00 67.0 74.00 134.0
Mix of cereals 7.0 70.142857 84.204965 12.0 35.00 47.0 52.00 258.0
Potatoes 10.0 75.100000 66.945168 13.0 27.25 62.0 89.50 236.0
Arable land (only PI) 2.0 86.500000 21.920310 71.0 78.75 86.5 94.25 102.0
Other non-permanent industrial crops 1.0 123.000000 NaN 123.0 123.00 123.0 123.00 123.0
N
count mean std min 25% 50% 75% max
LC1_Desc
Other non-permanent industrial crops 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Arable land (only PI) 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Other citrus fruit 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Tomatoes 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Potatoes 6.0 1.000000 0.000000 1.0 1.00 1.0 1.00 1.0
Cotton 3.0 1.000000 0.000000 1.0 1.00 1.0 1.00 1.0
Rye 26.0 1.230769 0.429669 1.0 1.00 1.0 1.00 2.0
Cherry fruit 4.0 1.250000 0.500000 1.0 1.00 1.0 1.25 2.0
Oranges 3.0 1.333333 0.577350 1.0 1.00 1.0 1.50 2.0
Vineyards 32.0 1.375000 0.609071 1.0 1.00 1.0 2.00 3.0
Olive groves 45.0 1.444444 0.813398 1.0 1.00 1.0 2.00 4.0
Other bare soil 57.0 1.473684 0.709760 1.0 1.00 1.0 2.00 4.0
Other root crops 2.0 1.500000 0.707107 1.0 1.25 1.5 1.75 2.0
Other cereals 2.0 1.500000 0.707107 1.0 1.25 1.5 1.75 2.0
Permanent industrial crops 2.0 1.500000 0.707107 1.0 1.25 1.5 1.75 2.0
Durum wheat 20.0 1.500000 0.827170 1.0 1.00 1.0 2.00 4.0
Nuts trees 12.0 1.500000 0.674200 1.0 1.00 1.0 2.00 3.0
Sunflower 31.0 1.548387 0.505879 1.0 1.00 2.0 2.00 2.0
Mix of cereals 9.0 1.555556 1.013794 1.0 1.00 1.0 2.00 4.0
Other fresh vegetables 5.0 1.600000 0.547723 1.0 1.00 2.0 2.00 2.0
Triticale 22.0 1.636364 0.847711 1.0 1.00 1.0 2.00 4.0
Dry pulses 25.0 1.640000 0.860233 1.0 1.00 1.0 2.00 4.0
Clovers 4.0 1.750000 0.500000 1.0 1.75 2.0 2.00 2.0
Lucerne 16.0 1.750000 0.577350 1.0 1.00 2.0 2.00 3.0
Maize 95.0 1.778947 0.814483 1.0 1.00 2.0 2.00 4.0
Oats 31.0 1.838710 2.067152 1.0 1.00 1.0 2.00 12.0
Other Leguminous and mixtures for fodder 7.0 1.857143 0.690066 1.0 1.50 2.0 2.00 3.0
Spontaneously re-vegetated surfaces 67.0 1.895522 1.207732 1.0 1.00 2.0 2.00 8.0
Barley 100.0 1.950000 1.635311 1.0 1.00 2.0 2.00 10.0
Common wheat 142.0 1.978873 1.391302 1.0 1.00 2.0 2.00 14.0
Apple fruit 5.0 2.000000 1.000000 1.0 1.00 2.0 3.00 3.0
Other fibre and oleaginous crops 1.0 2.000000 NaN 2.0 2.00 2.0 2.00 2.0
Non built-up linear features 1.0 2.000000 NaN 2.0 2.00 2.0 2.00 2.0
Other fruit trees and berries 7.0 2.142857 1.069045 1.0 1.50 2.0 2.50 4.0
Soya 5.0 2.200000 1.643168 1.0 1.00 2.0 2.00 5.0
Sugar beet 6.0 2.333333 0.516398 2.0 2.00 2.0 2.75 3.0
Other artificial areas 7.0 2.714286 0.755929 2.0 2.00 3.0 3.00 4.0
Rape and turnip rape 40.0 2.975000 4.411451 1.0 1.00 2.0 2.00 27.0
Shrubland with sparse tree cover 29.0 3.137931 2.310290 1.0 2.00 3.0 4.00 13.0
Broadleaved woodland 228.0 3.495614 3.300644 1.0 2.00 3.0 4.00 27.0
Pine dominated mixed woodland 62.0 3.516129 5.206370 1.0 1.00 2.0 3.00 28.0
Grassland with sparse tree/shrub cover 53.0 3.566038 3.815502 1.0 2.00 2.0 4.00 21.0
Pine dominated coniferous woodland 122.0 3.795082 4.990799 1.0 1.00 2.0 4.00 23.0
Temporary grassland 21.0 3.904762 4.060847 1.0 2.00 3.0 4.00 21.0
Grassland without tree/shrub cover 264.0 4.193182 3.852384 1.0 2.00 3.0 5.00 36.0
Other coniferous woodland 17.0 4.352941 2.029199 2.0 3.00 4.0 5.00 10.0
Shrubland without tree cover 38.0 4.473684 4.366561 1.0 2.00 3.0 5.00 23.0
Rocks and stones 1.0 5.000000 NaN 5.0 5.00 5.0 5.00 5.0
Other mixed woodland 29.0 5.000000 5.988083 1.0 1.00 3.0 5.00 24.0
Spruce dominated mixed woodland 64.0 5.546875 5.474123 1.0 2.00 4.0 6.00 27.0
Spruce dominated coniferous woodland 90.0 6.655556 5.716448 1.0 2.00 5.0 9.75 22.0
Lichens and Moss 1.0 12.000000 NaN 12.0 12.00 12.0 12.00 12.0
Peatbogs 3.0 18.333333 5.507571 12.0 16.50 21.0 21.50 22.0
K
count mean std min 25% 50% 75% max
LC1_Desc
Strawberries 1.0 28.000000 NaN 28.0 28.00 28.0 28.00 28.0
Inland salty water bodies 1.0 37.000000 NaN 37.0 37.00 37.0 37.00 37.0
Lichens and Moss 1.0 47.000000 NaN 47.0 47.00 47.0 47.00 47.0
Inland fresh running water 1.0 56.000000 NaN 56.0 56.00 56.0 56.00 56.0
Rocks and stones 1.0 73.000000 NaN 73.0 73.00 73.0 73.00 73.0
Apple fruit 1.0 74.000000 NaN 74.0 74.00 74.0 74.00 74.0
Other mixed woodland 42.0 101.642857 78.014952 15.0 55.00 73.0 124.00 394.0
Rye 18.0 106.000000 71.448871 20.0 60.25 96.5 131.25 321.0
Spruce dominated mixed woodland 73.0 106.082192 90.849349 12.0 46.00 79.0 136.00 483.0
Tobacco 1.0 107.000000 NaN 107.0 107.00 107.0 107.00 107.0
Other cereals 5.0 108.000000 73.525506 28.0 66.00 76.0 168.00 202.0
Pine dominated coniferous woodland 131.0 111.709924 133.184516 11.0 29.00 59.0 146.50 830.0
Pine dominated mixed woodland 54.0 116.481481 137.865499 12.0 39.00 59.5 142.25 802.0
Clovers 4.0 125.250000 59.935382 51.0 90.00 134.5 169.75 181.0
Triticale 8.0 127.625000 55.148987 33.0 98.25 124.0 172.50 203.0
Spruce dominated coniferous woodland 80.0 139.500000 124.241700 12.0 56.25 94.5 195.50 713.0
Other Leguminous and mixtures for fodder 9.0 140.222222 84.181022 46.0 72.00 115.0 190.00 293.0
Floriculture and ornamental plants 1.0 145.000000 NaN 145.0 145.00 145.0 145.00 145.0
Cherry fruit 2.0 163.500000 43.133514 133.0 148.25 163.5 178.75 194.0
Non built-up linear features 4.0 170.750000 172.455550 34.0 55.00 118.0 233.75 413.0
Other non-permanent industrial crops 2.0 173.000000 11.313708 165.0 169.00 173.0 177.00 181.0
Other coniferous woodland 14.0 176.071429 186.536639 28.0 59.00 88.0 221.25 639.0
Peatbogs 3.0 176.666667 26.839026 156.0 161.50 167.0 187.00 207.0
Broadleaved woodland 204.0 179.367647 193.428892 8.0 79.00 128.0 213.00 2151.0
Grassland without tree/shrub cover 287.0 187.121951 205.244564 12.0 83.00 144.0 224.50 2708.0
Maize 93.0 204.451613 100.847444 40.0 128.00 178.0 268.00 603.0
Shrubland with sparse tree cover 29.0 205.137931 151.467989 34.0 116.00 164.0 233.00 727.0
Oats 17.0 208.588235 139.996901 30.0 87.00 217.0 304.00 494.0
Temporary grassland 42.0 213.880952 208.436011 31.0 81.25 140.5 241.50 1129.0
Arable land (only PI) 2.0 218.500000 75.660426 165.0 191.75 218.5 245.25 272.0
Nurseries 1.0 219.000000 NaN 219.0 219.00 219.0 219.00 219.0
Common wheat 161.0 220.950311 134.664945 49.0 128.00 188.0 265.00 1095.0
Other root crops 5.0 221.200000 120.559944 63.0 186.00 187.0 286.00 384.0
Sugar beet 5.0 226.600000 176.483144 95.0 98.00 157.0 266.00 517.0
Permanent industrial crops 1.0 236.000000 NaN 236.0 236.00 236.0 236.00 236.0
Grassland with sparse tree/shrub cover 41.0 239.048780 150.059480 39.0 132.00 176.0 328.00 733.0
Potatoes 8.0 241.750000 120.159121 120.0 138.00 210.5 333.50 405.0
Other fibre and oleaginous crops 5.0 242.200000 117.497660 101.0 169.00 247.0 284.00 410.0
Barley 101.0 250.910891 151.423254 35.0 132.00 214.0 341.00 715.0
Spontaneously re-vegetated surfaces 90.0 253.533333 278.672261 17.0 103.00 170.5 303.25 1824.0
Other bare soil 71.0 255.859155 161.410771 36.0 126.00 230.0 344.00 773.0
Shrubland without tree cover 47.0 260.446809 284.078894 31.0 90.00 168.0 282.50 1437.0
Nuts trees 18.0 264.777778 261.338310 50.0 101.25 189.0 330.25 1167.0
Pear fruit 3.0 268.000000 215.062782 106.0 146.00 186.0 349.00 512.0
Mix of cereals 7.0 269.000000 180.772417 130.0 147.00 212.0 304.00 639.0
Dry pulses 15.0 271.000000 166.684904 44.0 140.00 289.0 384.50 560.0
Soya 6.0 271.166667 160.595662 124.0 155.50 220.5 345.50 541.0
Tomatoes 1.0 277.000000 NaN 277.0 277.00 277.0 277.00 277.0
Rape and turnip rape 45.0 284.400000 204.297065 75.0 140.00 230.0 323.00 1117.0
Lucerne 22.0 286.727273 171.129631 101.0 185.00 207.0 350.75 735.0
Vineyards 35.0 300.085714 172.919630 63.0 179.00 276.0 344.00 898.0
Sunflower 32.0 305.718750 209.469874 79.0 186.75 248.5 324.75 1058.0
Other fruit trees and berries 12.0 314.666667 196.451397 91.0 159.75 275.5 384.75 770.0
Durum wheat 27.0 382.037037 318.503771 48.0 199.00 276.0 452.00 1619.0
Cotton 1.0 390.000000 NaN 390.0 390.00 390.0 390.00 390.0
Other artificial areas 2.0 394.500000 60.104076 352.0 373.25 394.5 415.75 437.0
Other fresh vegetables 5.0 444.000000 270.818205 164.0 192.00 453.0 620.00 791.0
Olive groves 46.0 489.869565 470.086829 46.0 212.00 348.0 534.25 2649.0
In [7]:
# See Numeric Average per LU1_Desc
list_variables = ['pH_CaCl2','pH_H2O','EC','OC','CaCO3','P','N','K']
for var in list_variables:
    try :
        df_temp = df.loc[df[var].str.isnumeric().fillna(False)]
        df_temp[var] = df_temp[var].astype(float)
    except :
        df_temp = df.copy()
    display(df_temp.groupby('LU1_Desc')[[var]].describe().sort_values((var,'mean')))
pH_CaCl2
count mean std min 25% 50% 75% max
LU1_Desc
Forestry 5602.0 4.394163 1.141518 2.6 3.600 4.10 4.800 7.8
Abandoned transport areas 1.0 4.500000 NaN 4.5 4.500 4.50 4.500 4.5
Other primary production 4.0 4.700000 1.224745 3.5 4.100 4.45 5.050 6.4
Amenities, museum, leisure (e.g. parks, botanical gardens) 66.0 5.062121 1.396784 2.9 3.700 4.65 6.575 7.5
Sport 8.0 5.225000 0.909867 4.2 4.600 5.00 5.550 6.6
Commerce 4.0 5.525000 1.337597 4.1 4.625 5.45 6.350 7.1
Mining and quarrying 12.0 5.600000 1.604539 3.3 4.225 5.60 7.000 7.8
Financial, professional and information services 1.0 5.600000 NaN 5.6 5.600 5.60 5.600 5.6
Energy production 6.0 5.650000 1.093161 4.3 5.050 5.35 6.400 7.2
Water transport 1.0 5.700000 NaN 5.7 5.700 5.70 5.700 5.7
Electricity, gas and thermal power distribution 56.0 5.700000 1.290102 3.4 4.500 5.85 7.000 7.6
Abandoned residential areas 6.0 5.816667 0.708284 4.7 5.550 5.85 6.150 6.8
Residential 54.0 5.940741 1.176743 3.2 5.000 6.15 7.000 7.5
Semi-natural and natural areas not in use 1284.0 6.007944 1.383067 2.9 4.800 6.50 7.300 8.9
Road transport 35.0 6.234286 1.209507 4.2 5.250 6.60 7.150 8.4
Agriculture (excluding fallow land and kitchen gardens) 10931.0 6.265154 1.041918 3.1 5.400 6.40 7.300 9.8
Other abandoned areas 123.0 6.335772 1.139466 3.7 5.300 6.80 7.300 7.7
Community services 8.0 6.337500 0.988415 5.0 5.650 6.45 7.225 7.3
Kitchen gardens 23.0 6.343478 1.017495 4.5 5.650 6.60 7.150 7.6
Construction 5.0 6.440000 0.973653 4.9 6.100 6.80 7.100 7.3
Protection infrastructures 6.0 6.500000 1.145426 4.7 5.850 6.80 7.300 7.7
Railway transport 4.0 6.525000 0.842120 5.7 5.850 6.55 7.225 7.3
Fallow land 737.0 6.740706 1.055871 4.0 6.000 7.30 7.500 8.1
Logistics and storage 2.0 6.800000 0.707107 6.3 6.550 6.80 7.050 7.3
Abandoned industrial areas 2.0 7.050000 0.919239 6.4 6.725 7.05 7.375 7.7
Water supply and treatment 2.0 7.400000 0.848528 6.8 7.100 7.40 7.700 8.0
pH_H2O
count mean std min 25% 50% 75% max
LU1_Desc
Forestry 5602.0 5.041403 1.022154 3.34 4.3000 4.730 5.5000 8.49
Abandoned transport areas 1.0 5.060000 NaN 5.06 5.0600 5.060 5.0600 5.06
Other primary production 4.0 5.267500 1.045287 4.14 4.8600 5.130 5.5375 6.67
Amenities, museum, leisure (e.g. parks, botanical gardens) 66.0 5.619242 1.249012 3.75 4.4050 5.520 6.8575 7.89
Sport 8.0 5.761250 0.818857 4.78 5.1300 5.750 6.1825 6.92
Energy production 6.0 6.145000 0.915593 5.06 5.5650 5.960 6.7000 7.51
Commerce 4.0 6.152500 1.134207 4.89 5.4750 6.095 6.7725 7.53
Water transport 1.0 6.160000 NaN 6.16 6.1600 6.160 6.1600 6.16
Mining and quarrying 12.0 6.212500 1.520874 4.04 5.0150 6.280 7.6400 8.27
Electricity, gas and thermal power distribution 56.0 6.235179 1.193374 4.22 5.2375 6.380 7.3250 8.24
Abandoned residential areas 6.0 6.245000 0.582881 5.66 5.9075 6.065 6.4250 7.28
Financial, professional and information services 1.0 6.320000 NaN 6.32 6.3200 6.320 6.3200 6.32
Residential 54.0 6.444444 1.052181 4.00 5.6400 6.570 7.2425 8.43
Semi-natural and natural areas not in use 1284.0 6.528910 1.299073 3.58 5.4075 6.780 7.7300 8.99
Agriculture (excluding fallow land and kitchen gardens) 10931.0 6.776108 1.028822 3.43 5.9600 6.810 7.7200 10.43
Road transport 35.0 6.802571 1.142042 4.84 5.7150 7.080 7.7300 9.07
Community services 8.0 6.843750 0.857637 5.73 6.1625 6.915 7.6025 7.77
Kitchen gardens 23.0 6.863913 1.034451 4.88 6.1150 7.020 7.7800 8.39
Railway transport 4.0 6.877500 0.793867 5.99 6.3275 6.925 7.4750 7.67
Other abandoned areas 123.0 6.913740 1.090079 4.31 6.1250 7.300 7.8750 8.44
Construction 5.0 6.936000 1.074258 5.40 6.2900 7.260 7.8000 7.93
Protection infrastructures 6.0 6.998333 1.061535 5.40 6.3125 7.285 7.8450 8.00
Fallow land 737.0 7.261805 1.014457 4.30 6.5200 7.700 8.0400 8.90
Logistics and storage 2.0 7.295000 0.572756 6.89 7.0925 7.295 7.4975 7.70
Abandoned industrial areas 2.0 7.635000 1.011163 6.92 7.2775 7.635 7.9925 8.35
Water supply and treatment 2.0 7.645000 0.601041 7.22 7.4325 7.645 7.8575 8.07
EC
count mean std min 25% 50% 75% max
LU1_Desc
Other primary production 4.0 6.510000 3.269312 2.76 4.56000 6.480 8.4300 10.32
Energy production 6.0 7.361667 2.322313 3.73 6.64250 7.150 8.6850 10.47
Financial, professional and information services 1.0 9.300000 NaN 9.30 9.30000 9.300 9.3000 9.30
Commerce 4.0 9.637500 6.392591 3.00 5.04000 9.350 13.9475 16.85
Logistics and storage 2.0 10.015000 6.696301 5.28 7.64750 10.015 12.3825 14.75
Forestry 5597.0 13.703113 15.779443 1.47 5.21000 8.840 16.4200 235.00
Community services 8.0 13.901250 6.088182 6.16 7.47500 16.255 18.0350 21.62
Abandoned transport areas 1.0 14.520000 NaN 14.52 14.52000 14.520 14.5200 14.52
Other abandoned areas 123.0 15.688943 10.481479 2.53 8.29500 14.810 18.2650 61.10
Protection infrastructures 6.0 15.765000 6.527783 6.17 11.91750 16.385 20.6200 23.19
Residential 54.0 16.076667 10.775026 3.74 8.87000 14.465 19.8150 58.10
Railway transport 4.0 16.787500 5.777003 10.67 12.77000 16.540 20.5575 23.40
Amenities, museum, leisure (e.g. parks, botanical gardens) 66.0 16.960758 11.199643 3.10 8.23500 13.115 24.2950 52.17
Abandoned industrial areas 2.0 17.005000 11.037937 9.20 13.10250 17.005 20.9075 24.81
Construction 5.0 17.704000 6.961248 11.81 13.57000 16.680 16.9100 29.55
Agriculture (excluding fallow land and kitchen gardens) 10929.0 19.578463 21.961827 1.42 10.36000 15.400 21.7000 526.54
Road transport 35.0 19.599143 17.984985 2.36 8.41500 19.300 23.6650 107.46
Semi-natural and natural areas not in use 1283.0 21.410156 46.006777 0.24 9.56000 15.280 21.6000 1295.60
Sport 8.0 22.225000 15.774705 7.54 13.44250 17.665 24.3700 54.74
Kitchen gardens 23.0 23.309130 21.073100 5.95 12.56000 17.420 23.1100 89.90
Abandoned residential areas 6.0 23.325000 13.694019 3.54 18.40250 21.530 29.0750 44.40
Electricity, gas and thermal power distribution 56.0 25.540714 42.985539 3.04 9.79750 14.680 20.6150 233.00
Water transport 1.0 25.800000 NaN 25.80 25.80000 25.800 25.8000 25.80
Fallow land 737.0 30.307232 56.008461 2.56 10.23000 16.050 21.6100 553.18
Mining and quarrying 12.0 48.758750 104.881439 2.78 9.03875 12.135 31.2500 377.00
Water supply and treatment 2.0 214.080000 292.629070 7.16 110.62000 214.080 317.5400 421.00
OC
count mean std min 25% 50% 75% max
LU1_Desc
Water supply and treatment 1.0 6.000000 NaN 6.0 6.00 6.0 6.00 6.0
Fallow land 67.0 16.029851 13.102128 3.0 8.50 14.0 18.00 92.0
Energy production 1.0 20.000000 NaN 20.0 20.00 20.0 20.00 20.0
Commerce 2.0 20.500000 9.192388 14.0 17.25 20.5 23.75 27.0
Kitchen gardens 1.0 21.000000 NaN 21.0 21.00 21.0 21.00 21.0
Electricity, gas and thermal power distribution 3.0 23.666667 10.408330 12.0 19.50 27.0 29.50 32.0
Agriculture (excluding fallow land and kitchen gardens) 1093.0 25.734675 36.274986 3.0 11.00 17.0 27.00 463.0
Protection infrastructures 1.0 28.000000 NaN 28.0 28.00 28.0 28.00 28.0
Abandoned residential areas 1.0 40.000000 NaN 40.0 40.00 40.0 40.00 40.0
Sport 1.0 48.000000 NaN 48.0 48.00 48.0 48.00 48.0
Semi-natural and natural areas not in use 131.0 53.839695 76.560867 4.0 16.50 29.0 57.00 505.0
Road transport 2.0 54.500000 72.831998 3.0 28.75 54.5 80.25 106.0
Amenities, museum, leisure (e.g. parks, botanical gardens) 3.0 55.000000 10.816654 43.0 50.50 58.0 61.00 64.0
Residential 13.0 66.384615 97.583758 13.0 26.00 33.0 60.00 379.0
Other abandoned areas 9.0 67.888889 135.297306 8.0 20.00 26.0 33.00 428.0
Forestry 511.0 88.395303 121.053886 3.0 22.00 41.0 83.00 527.0
CaCO3
count mean std min 25% 50% 75% max
LU1_Desc
Water transport 1.0 1.000000 NaN 1.0 1.00 1.0 1.00 1.0
Other primary production 2.0 1.000000 0.000000 1.0 1.00 1.0 1.00 1.0
Abandoned residential areas 3.0 4.000000 4.358899 1.0 1.50 2.0 5.50 9.0
Energy production 2.0 6.000000 2.828427 4.0 5.00 6.0 7.00 8.0
Sport 2.0 17.500000 23.334524 1.0 9.25 17.5 25.75 34.0
Forestry 3721.0 17.891965 72.574427 1.0 1.00 1.0 3.00 867.0
Amenities, museum, leisure (e.g. parks, botanical gardens) 38.0 28.921053 69.363275 1.0 1.00 1.5 4.75 267.0
Railway transport 3.0 32.666667 41.016257 1.0 9.50 18.0 48.50 79.0
Mining and quarrying 9.0 49.666667 104.127326 1.0 3.00 6.0 40.00 323.0
Residential 35.0 54.142857 96.570043 1.0 2.00 5.0 51.50 372.0
Electricity, gas and thermal power distribution 26.0 64.576923 104.108472 1.0 1.25 15.5 59.00 400.0
Construction 2.0 70.500000 4.949747 67.0 68.75 70.5 72.25 74.0
Kitchen gardens 13.0 96.461538 149.336095 1.0 6.00 25.0 75.00 445.0
Road transport 21.0 117.238095 184.042361 1.0 8.00 44.0 133.00 654.0
Community services 5.0 122.000000 74.067537 1.0 111.00 144.0 159.00 195.0
Commerce 2.0 123.500000 173.241161 1.0 62.25 123.5 184.75 246.0
Agriculture (excluding fallow land and kitchen gardens) 5786.0 130.646215 179.411300 1.0 3.00 34.0 214.00 926.0
Semi-natural and natural areas not in use 914.0 133.297593 195.752076 1.0 2.00 23.0 200.75 886.0
Protection infrastructures 5.0 135.200000 200.983084 1.0 3.00 16.0 191.00 465.0
Water supply and treatment 2.0 164.000000 214.960461 12.0 88.00 164.0 240.00 316.0
Logistics and storage 1.0 187.000000 NaN 187.0 187.00 187.0 187.00 187.0
Fallow land 535.0 200.557009 187.996643 1.0 13.00 167.0 339.00 769.0
Other abandoned areas 74.0 203.608108 233.066092 1.0 3.25 90.0 398.75 715.0
Abandoned industrial areas 1.0 250.000000 NaN 250.0 250.00 250.0 250.00 250.0
P
count mean std min 25% 50% 75% max
LU1_Desc
Railway transport 1.0 10.000000 NaN 10.0 10.00 10.0 10.00 10.0
Protection infrastructures 1.0 10.000000 NaN 10.0 10.00 10.0 10.00 10.0
Construction 1.0 11.000000 NaN 11.0 11.00 11.0 11.00 11.0
Energy production 2.0 20.000000 11.313708 12.0 16.00 20.0 24.00 28.0
Community services 2.0 21.000000 7.071068 16.0 18.50 21.0 23.50 26.0
Road transport 6.0 23.833333 11.600287 10.0 14.50 24.5 30.75 40.0
Electricity, gas and thermal power distribution 10.0 26.200000 15.547776 12.0 16.00 21.5 30.75 62.0
Forestry 351.0 26.743590 20.342982 2.0 14.00 21.0 32.00 172.0
Semi-natural and natural areas not in use 55.0 28.036364 27.819500 6.0 12.00 19.0 30.50 162.0
Fallow land 49.0 32.102041 25.842669 10.0 15.00 24.0 40.00 140.0
Residential 6.0 34.000000 21.194339 21.0 25.50 27.0 27.00 77.0
Agriculture (excluding fallow land and kitchen gardens) 911.0 38.220637 30.087284 3.0 18.00 29.0 49.00 258.0
Sport 1.0 40.000000 NaN 40.0 40.00 40.0 40.00 40.0
Mining and quarrying 1.0 45.000000 NaN 45.0 45.00 45.0 45.00 45.0
Amenities, museum, leisure (e.g. parks, botanical gardens) 7.0 45.571429 25.092211 15.0 32.50 40.0 53.00 93.0
Kitchen gardens 5.0 57.400000 47.867526 11.0 11.00 56.0 90.00 119.0
Commerce 1.0 74.000000 NaN 74.0 74.00 74.0 74.00 74.0
Other abandoned areas 10.0 81.400000 154.487828 13.0 15.75 20.5 68.25 515.0
N
count mean std min 25% 50% 75% max
LU1_Desc
Fallow land 68.0 1.500000 1.029418 1.0 1.00 1.0 2.00 8.0
Kitchen gardens 3.0 2.000000 1.000000 1.0 1.50 2.0 2.50 3.0
Mining and quarrying 1.0 2.000000 NaN 2.0 2.00 2.0 2.00 2.0
Other abandoned areas 12.0 2.000000 0.738549 1.0 1.75 2.0 2.25 3.0
Road transport 4.0 2.500000 0.577350 2.0 2.00 2.5 3.00 3.0
Agriculture (excluding fallow land and kitchen gardens) 1069.0 2.523854 2.656108 1.0 1.00 2.0 3.00 36.0
Residential 5.0 2.600000 1.341641 2.0 2.00 2.0 2.00 5.0
Electricity, gas and thermal power distribution 9.0 3.000000 1.000000 2.0 2.00 3.0 3.00 5.0
Semi-natural and natural areas not in use 132.0 3.712121 3.902495 1.0 2.00 3.0 4.00 22.0
Amenities, museum, leisure (e.g. parks, botanical gardens) 10.0 4.300000 1.828782 2.0 3.25 4.0 4.00 8.0
Forestry 552.0 4.460145 5.017053 1.0 1.00 3.0 5.00 28.0
Abandoned residential areas 1.0 5.000000 NaN 5.0 5.00 5.0 5.00 5.0
K
count mean std min 25% 50% 75% max
LU1_Desc
Energy production 2.0 62.000000 39.597980 34.0 48.00 62.0 76.00 90.0
Mining and quarrying 1.0 80.000000 NaN 80.0 80.00 80.0 80.00 80.0
Road transport 6.0 104.666667 151.419506 34.0 36.00 41.5 58.25 413.0
Forestry 547.0 124.740402 144.122335 8.0 48.00 84.0 153.50 2151.0
Amenities, museum, leisure (e.g. parks, botanical gardens) 7.0 139.714286 157.963829 51.0 63.00 77.0 115.50 493.0
Sport 1.0 159.000000 NaN 159.0 159.00 159.0 159.00 159.0
Kitchen gardens 4.0 165.500000 123.462545 50.0 68.00 153.5 251.00 305.0
Railway transport 1.0 197.000000 NaN 197.0 197.00 197.0 197.00 197.0
Community services 2.0 206.000000 132.936075 112.0 159.00 206.0 253.00 300.0
Other abandoned areas 8.0 222.375000 127.797762 69.0 115.00 221.0 303.00 392.0
Construction 1.0 236.000000 NaN 236.0 236.00 236.0 236.00 236.0
Agriculture (excluding fallow land and kitchen gardens) 1109.0 240.068530 200.906476 12.0 121.00 187.0 300.00 2649.0
Semi-natural and natural areas not in use 141.0 245.397163 264.811466 17.0 103.00 181.0 314.00 2708.0
Fallow land 105.0 265.142857 261.132866 25.0 110.00 202.0 351.00 1824.0
Residential 6.0 274.666667 214.283613 84.0 117.75 241.5 317.25 662.0
Electricity, gas and thermal power distribution 2.0 394.500000 60.104076 352.0 373.25 394.5 415.75 437.0
Abandoned industrial areas 1.0 487.000000 NaN 487.0 487.00 487.0 487.00 487.0
In [8]:
# See Numeric Descriptive Statistics of each country
list_variables = ['pH_CaCl2','pH_H2O','EC','OC','CaCO3','P','N','K']
for var in list_variables:
    try :
        df_temp = df.loc[df[var].str.isnumeric().fillna(False)]
        df_temp[var] = df_temp[var].astype(float) 
    except :
        df_temp = df.copy()
    display(df_temp.groupby('COUNTRY')[[var]].describe().sort_values((var,'mean')))
    
    fig_map = px.choropleth(df_temp.groupby('COUNTRY')[[var]].describe()[(var,'mean')].to_frame('mean').reset_index(), 
                        locations='COUNTRY', 
                        locationmode='country names',
                        color='mean',
                        color_continuous_scale='Viridis',title=var)
    fig_map.update_layout(geo_scope='europe')
    fig_map.update_layout(height=700, width=1200)
    fig_map.show()
    print("-"*170)
    print("-"*170)
pH_CaCl2
count mean std min 25% 50% 75% max
COUNTRY
Sweden 1906.0 3.967943 0.825083 2.6 3.400 3.80 4.300 7.2
Finland 1143.0 4.025284 0.738377 2.8 3.500 3.90 4.300 6.7
Portugal 428.0 5.033879 0.940849 2.9 4.300 4.80 5.500 7.5
Poland 1376.0 5.169259 1.060274 3.0 4.300 5.00 6.000 8.4
Ireland 143.0 5.248951 0.974598 3.0 4.700 5.20 5.900 7.2
Austria 449.0 5.302227 1.358109 2.9 4.100 5.20 6.600 7.6
Slovenia 112.0 5.319643 1.212164 3.0 4.100 5.30 6.525 7.2
Czechia 445.0 5.407640 1.176453 2.8 4.600 5.50 6.300 7.7
Germany 779.0 5.475225 1.203792 2.8 4.700 5.60 6.500 7.5
Denmark 171.0 5.525731 0.885327 3.1 5.100 5.60 6.050 7.4
Luxembourg 35.0 5.534286 0.987851 3.3 5.150 5.70 6.150 7.1
Latvia 331.0 5.538066 1.125571 2.9 4.750 5.70 6.500 7.2
Estonia 201.0 5.646766 1.112565 2.8 5.200 5.80 6.600 7.3
Belgium 130.0 5.682308 1.196925 3.0 5.000 6.15 6.500 7.4
Slovakia 186.0 5.725806 1.101586 3.3 4.800 5.80 6.900 7.4
Bulgaria 574.0 5.854530 1.018882 3.7 5.100 5.80 6.800 7.7
Croatia 106.0 5.862264 1.073442 3.8 5.050 6.05 6.875 7.4
Romania 603.0 5.865506 1.045464 3.5 5.100 5.80 6.900 7.8
Netherlands (the) 99.0 6.019192 1.169657 3.2 5.300 6.10 7.050 7.4
Lithuania 386.0 6.043264 1.002034 3.1 5.400 6.30 6.900 7.5
France 2735.0 6.055283 1.077906 3.0 5.300 6.20 7.100 7.7
Hungary 354.0 6.478249 1.002889 3.4 5.900 6.80 7.300 7.8
Italy 1242.0 6.615298 1.011174 3.4 6.100 7.10 7.300 8.0
Spain 3867.0 6.661184 1.193794 2.9 5.800 7.30 7.500 8.9
Cyprus 69.0 7.252174 0.240471 6.4 7.200 7.30 7.400 7.7
Malta 2.0 7.450000 0.212132 7.3 7.375 7.45 7.525 7.6
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pH_H2O
count mean std min 25% 50% 75% max
COUNTRY
Sweden 1906.0 4.703809 0.724073 3.38 4.2000 4.530 4.9900 7.70
Finland 1143.0 4.756710 0.667219 3.37 4.2950 4.610 5.0500 7.20
Poland 1376.0 5.664920 1.022708 3.57 4.8500 5.590 6.4000 9.07
Ireland 143.0 5.693636 0.893637 3.75 5.1150 5.660 6.3500 7.78
Portugal 428.0 5.755654 0.905091 4.03 5.0775 5.635 6.2700 8.35
Slovenia 112.0 5.843482 1.091427 3.64 4.8575 5.920 6.9300 7.82
Austria 449.0 5.857840 1.290156 3.63 4.7400 5.760 6.9500 8.30
Czechia 445.0 5.993281 1.133131 3.34 5.3100 6.100 6.8200 8.39
Germany 779.0 6.014390 1.114912 3.46 5.3000 6.130 6.8950 8.24
Luxembourg 35.0 6.034571 0.939106 4.07 5.7350 6.270 6.5350 7.78
Latvia 331.0 6.053172 1.044154 3.54 5.3300 6.240 6.9300 8.01
Denmark 171.0 6.117602 0.804159 4.09 5.6550 6.130 6.5750 8.09
Estonia 201.0 6.142637 0.980917 3.67 5.6200 6.310 6.9800 7.90
Belgium 130.0 6.261231 1.148473 3.79 5.6800 6.750 7.0650 8.05
Slovakia 186.0 6.319570 1.089962 3.43 5.4925 6.325 7.2675 8.21
Croatia 106.0 6.333396 1.019559 4.05 5.5450 6.480 7.2025 8.12
Romania 603.0 6.362554 0.959440 3.87 5.7050 6.270 7.2300 8.61
Bulgaria 574.0 6.514216 0.961321 4.46 5.8125 6.430 7.2775 8.44
France 2735.0 6.517514 1.057696 3.53 5.7600 6.580 7.4600 8.52
Lithuania 386.0 6.524922 0.939494 3.75 5.9625 6.730 7.2800 7.92
Netherlands (the) 99.0 6.565556 1.192764 3.60 5.8100 6.680 7.6400 8.02
Hungary 354.0 7.086949 0.987251 4.01 6.5500 7.220 7.9200 9.62
Italy 1242.0 7.090201 0.996057 3.86 6.4600 7.450 7.8600 8.80
Spain 3867.0 7.178011 1.162210 3.82 6.3600 7.720 8.0400 8.99
Cyprus 69.0 7.910145 0.333464 6.89 7.7200 7.940 8.1400 8.72
Malta 2.0 8.165000 0.021213 8.15 8.1575 8.165 8.1725 8.18
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EC
count mean std min 25% 50% 75% max
COUNTRY
Finland 1143.0 9.426448 8.738262 1.47 3.7250 6.540 11.7050 104.90
Portugal 428.0 9.776647 8.046626 2.22 4.4800 6.430 13.2100 64.59
Bulgaria 574.0 11.232073 6.427121 2.89 6.3125 9.215 14.6475 37.20
Sweden 1900.0 12.826045 12.920436 1.97 5.0675 8.875 15.5500 132.60
Czechia 445.0 13.097708 6.793270 4.13 8.4400 11.260 16.5500 53.04
Luxembourg 35.0 13.892286 6.739026 5.54 9.6150 12.170 17.0750 33.73
Slovakia 186.0 14.111828 8.487399 3.41 7.2625 12.070 18.4075 44.80
Hungary 354.0 14.215989 8.410070 1.99 8.0900 13.215 18.0175 67.39
Poland 1376.0 15.539568 15.338935 2.22 6.8775 12.215 18.3500 169.77
Germany 779.0 16.052388 11.442098 2.82 8.6700 13.290 20.2500 137.20
France 2735.0 16.081289 11.836840 2.25 9.4700 13.990 19.7100 377.00
Denmark 171.0 16.462836 10.908517 3.77 10.2900 13.940 19.6150 84.62
Lithuania 386.0 16.536321 15.907060 2.44 8.0200 12.675 18.4825 135.10
Belgium 130.0 16.617615 9.802331 4.31 10.3200 13.855 19.6050 72.79
Latvia 331.0 17.209909 19.810184 2.17 7.0000 11.580 18.5800 138.40
Croatia 106.0 17.908868 11.431181 3.40 9.0400 15.420 23.5750 51.20
Netherlands (the) 99.0 18.002323 12.978981 0.24 10.8500 14.110 22.6050 77.89
Romania 603.0 18.387595 14.586564 2.37 8.4550 15.300 24.0500 182.20
Estonia 201.0 24.211866 25.716996 2.45 9.6200 15.950 24.9000 199.20
Slovenia 112.0 24.234152 23.352286 3.41 10.3450 19.265 26.6900 177.60
Italy 1240.0 24.501137 20.714486 3.99 14.3450 19.275 26.9900 263.50
Cyprus 69.0 24.570145 38.814163 3.99 15.5700 18.870 24.0800 332.60
Spain 3867.0 25.033574 45.693204 1.42 11.3200 16.040 21.9150 1295.60
Austria 449.0 28.547906 22.128501 4.79 13.9700 22.300 36.8000 172.60
Ireland 143.0 36.620420 47.372470 5.63 15.4500 28.300 45.3250 526.54
Malta 2.0 55.285000 48.953002 20.67 37.9775 55.285 72.5925 89.90
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OC
count mean std min 25% 50% 75% max
COUNTRY
Cyprus 7.0 14.000000 7.895146 6.0 8.50 12.0 18.00 27.0
Belgium 15.0 17.800000 10.199440 8.0 10.50 11.0 24.50 41.0
Hungary 37.0 20.189189 13.018871 4.0 11.00 18.0 27.00 68.0
Poland 123.0 20.260163 43.115141 4.0 9.50 12.0 18.00 440.0
Romania 43.0 20.534884 12.111287 4.0 16.00 19.0 22.00 81.0
Bulgaria 61.0 20.754098 10.991900 6.0 15.00 18.0 22.00 63.0
Denmark 12.0 24.916667 13.885626 10.0 15.75 21.0 26.25 55.0
Spain 382.0 24.931937 30.138100 3.0 9.00 14.0 27.75 300.0
Portugal 42.0 26.571429 30.020434 3.0 9.00 15.5 26.75 137.0
Czechia 42.0 27.166667 30.374826 11.0 16.00 19.0 26.00 208.0
Italy 103.0 29.747573 32.611714 3.0 12.00 20.0 37.00 277.0
Netherlands (the) 13.0 30.538462 26.390072 6.0 12.00 19.0 32.00 85.0
France 290.0 32.855172 41.162263 5.0 14.25 23.0 37.00 473.0
Slovakia 19.0 33.000000 30.530495 11.0 18.50 23.0 31.50 117.0
Luxembourg 5.0 33.800000 13.827509 19.0 24.00 32.0 40.00 54.0
Lithuania 40.0 38.375000 77.362181 6.0 14.00 19.0 22.50 379.0
Ireland 9.0 39.777778 13.908431 28.0 29.00 39.0 44.00 70.0
Germany 81.0 40.567901 60.885946 6.0 15.00 22.0 36.00 471.0
Croatia 7.0 51.000000 30.391885 15.0 25.50 56.0 69.00 97.0
Latvia 37.0 65.837838 108.978212 9.0 19.00 26.0 38.00 461.0
Slovenia 11.0 68.272727 48.280619 10.0 29.00 52.0 115.00 137.0
Austria 41.0 81.146341 95.487842 12.0 22.00 40.0 105.00 481.0
Estonia 24.0 88.166667 135.476828 12.0 21.75 28.5 55.75 430.0
Finland 103.0 109.582524 143.780437 8.0 23.00 41.0 114.50 526.0
Sweden 177.0 120.005650 148.538696 5.0 24.00 53.0 135.00 527.0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CaCO3
count mean std min 25% 50% 75% max
COUNTRY
Finland 643.0 1.923795 1.214698 1.0 1.00 2.0 2.00 9.0
Sweden 1022.0 3.230920 22.631951 1.0 1.00 1.0 2.00 575.0
Latvia 160.0 6.806250 12.287180 1.0 1.00 2.0 6.25 79.0
Belgium 51.0 9.607843 24.662586 1.0 1.00 2.0 5.00 124.0
Estonia 135.0 9.859259 23.477891 1.0 1.00 2.0 6.00 189.0
Poland 488.0 10.055328 36.357327 1.0 1.00 1.0 3.00 550.0
Lithuania 198.0 10.863636 16.739163 1.0 1.00 5.0 13.00 117.0
Denmark 33.0 12.212121 28.897186 1.0 1.00 2.0 7.00 134.0
Czechia 159.0 12.415094 27.085729 1.0 1.00 2.0 6.00 166.0
Slovenia 85.0 18.976471 37.892384 1.0 1.00 2.0 19.00 211.0
Luxembourg 14.0 19.000000 38.864657 1.0 1.00 1.0 11.75 123.0
Germany 351.0 19.022792 47.138756 1.0 1.00 2.0 8.50 448.0
Ireland 47.0 20.595745 38.959656 1.0 1.50 3.0 12.00 165.0
Romania 342.0 20.646199 44.464167 1.0 1.00 1.0 22.75 491.0
Austria 262.0 28.198473 54.032262 1.0 1.00 3.0 22.75 292.0
Netherlands (the) 62.0 29.209677 30.226542 1.0 2.00 21.0 53.00 108.0
Bulgaria 271.0 34.878229 76.755093 1.0 1.00 4.0 30.00 599.0
Croatia 64.0 42.593750 88.546951 1.0 1.00 4.0 31.25 410.0
Slovakia 86.0 43.325581 111.417122 1.0 1.00 7.0 37.25 873.0
Portugal 154.0 47.292208 140.962607 1.0 1.00 1.0 3.00 743.0
Hungary 214.0 51.037383 74.618079 1.0 3.00 19.0 74.00 501.0
France 1514.0 106.803831 179.758306 1.0 2.00 7.0 139.75 926.0
Italy 994.0 107.277666 136.343774 1.0 4.00 53.0 166.75 818.0
Spain 3191.0 206.899405 204.015900 1.0 5.00 162.0 353.00 886.0
Cyprus 61.0 315.098361 283.466089 3.0 43.00 231.0 591.00 838.0
Malta 2.0 455.500000 14.849242 445.0 450.25 455.5 460.75 466.0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
P
count mean std min 25% 50% 75% max
COUNTRY
Croatia 2.0 13.500000 6.363961 9.0 11.25 13.5 15.75 18.0
Lithuania 27.0 23.962963 17.243687 10.0 14.50 18.0 26.00 90.0
Hungary 25.0 26.160000 20.951690 10.0 14.00 16.0 39.00 104.0
Sweden 167.0 27.904192 20.009104 10.0 16.00 23.0 32.00 172.0
Spain 244.0 28.483607 21.103794 10.0 14.00 21.5 34.00 142.0
Romania 46.0 30.826087 33.454649 2.0 9.00 20.0 34.00 160.0
Luxembourg 6.0 32.000000 30.423675 10.0 12.25 24.0 32.00 91.0
Finland 77.0 32.454545 24.775065 10.0 16.00 24.0 39.00 150.0
Estonia 18.0 32.611111 17.469768 14.0 20.50 24.0 44.00 72.0
Italy 67.0 33.671642 39.540692 10.0 14.00 20.0 31.50 258.0
Bulgaria 22.0 34.136364 25.387090 11.0 17.25 22.0 46.50 114.0
France 247.0 34.340081 23.098713 10.0 19.50 27.0 43.50 152.0
Austria 35.0 35.285714 36.214696 10.0 15.00 25.0 40.50 209.0
Latvia 18.0 36.055556 28.763687 10.0 13.25 20.0 57.50 99.0
Czechia 36.0 36.416667 19.805302 10.0 19.75 36.0 49.25 84.0
Slovenia 2.0 38.000000 12.727922 29.0 33.50 38.0 42.50 47.0
Poland 136.0 39.073529 23.222158 5.0 21.00 37.0 52.25 126.0
Portugal 18.0 40.611111 32.024143 10.0 18.50 26.0 55.50 132.0
Ireland 11.0 40.727273 25.163827 18.0 21.50 42.0 48.50 106.0
Slovakia 8.0 50.250000 49.204384 10.0 16.50 35.0 60.25 159.0
Germany 67.0 50.522388 34.366279 10.0 21.00 46.0 68.00 158.0
Denmark 16.0 51.187500 24.836046 19.0 31.50 47.5 75.25 90.0
Belgium 19.0 73.631579 62.319259 11.0 27.50 50.0 120.00 250.0
Cyprus 5.0 89.200000 64.064030 11.0 45.00 93.0 123.00 174.0
Netherlands (the) 9.0 92.222222 68.117138 12.0 55.00 63.0 134.00 236.0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
N
count mean std min 25% 50% 75% max
COUNTRY
Cyprus 8.0 1.250000 0.462910 1.0 1.00 1.0 1.25 2.0
Poland 169.0 1.875740 3.259045 1.0 1.00 1.0 2.00 36.0
Spain 390.0 2.061538 1.839668 1.0 1.00 1.0 2.00 20.0
Hungary 35.0 2.114286 1.430167 1.0 1.50 2.0 2.00 9.0
Romania 69.0 2.130435 1.187100 1.0 2.00 2.0 2.00 9.0
Bulgaria 72.0 2.138889 0.892939 1.0 2.00 2.0 3.00 5.0
Portugal 44.0 2.181818 1.385519 1.0 1.00 2.0 3.00 6.0
Netherlands (the) 4.0 2.250000 0.957427 1.0 1.75 2.5 3.00 3.0
Italy 99.0 2.424242 1.471435 1.0 1.00 2.0 3.00 8.0
Czechia 42.0 2.500000 1.109823 1.0 2.00 2.0 3.00 7.0
Denmark 22.0 2.772727 1.900672 1.0 2.00 2.0 3.00 10.0
Belgium 11.0 2.909091 1.578261 1.0 2.00 3.0 3.50 6.0
Germany 80.0 2.925000 2.727149 1.0 1.00 2.0 4.00 14.0
Slovakia 15.0 2.933333 0.961150 2.0 2.00 3.0 3.50 5.0
France 252.0 3.103175 2.257628 1.0 2.00 3.0 4.00 21.0
Croatia 8.0 3.500000 1.772811 1.0 2.50 4.0 4.25 6.0
Luxembourg 5.0 3.600000 2.073644 2.0 2.00 3.0 4.00 7.0
Lithuania 31.0 3.870968 4.971532 1.0 2.00 2.0 3.50 27.0
Latvia 33.0 3.909091 3.777926 1.0 2.00 2.0 4.00 15.0
Finland 113.0 4.761062 5.744989 1.0 1.00 2.0 5.00 24.0
Slovenia 6.0 4.833333 1.834848 2.0 4.00 5.0 6.00 7.0
Austria 40.0 5.475000 5.139029 1.0 2.00 3.5 6.25 22.0
Estonia 14.0 5.500000 5.932310 1.0 2.00 3.0 7.50 24.0
Sweden 178.0 6.067416 6.305406 1.0 2.00 3.0 9.75 28.0
Ireland 16.0 9.437500 6.673018 3.0 5.00 6.5 14.25 25.0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
K
count mean std min 25% 50% 75% max
COUNTRY
Latvia 38.0 85.526316 46.648621 26.0 52.00 74.5 118.50 218.0
Portugal 39.0 96.512821 58.161242 27.0 53.50 74.0 132.00 221.0
Luxembourg 2.0 97.000000 25.455844 79.0 88.00 97.0 106.00 115.0
Finland 102.0 106.696078 111.530113 12.0 40.25 61.0 137.75 715.0
Sweden 196.0 115.198980 105.541807 12.0 46.00 74.5 152.25 713.0
Denmark 20.0 115.300000 54.197592 31.0 74.50 100.5 152.50 222.0
Poland 131.0 115.381679 173.159129 8.0 37.50 86.0 136.00 1824.0
Netherlands (the) 11.0 130.363636 111.165888 30.0 62.50 75.0 177.00 384.0
Lithuania 28.0 143.785714 70.780494 51.0 84.75 125.5 183.25 300.0
Germany 91.0 163.351648 130.343680 14.0 67.00 117.0 232.00 557.0
Czechia 41.0 166.146341 128.446985 53.0 89.00 134.0 195.00 733.0
Austria 36.0 167.750000 118.454422 43.0 90.75 119.0 198.75 642.0
Slovenia 11.0 174.545455 89.898124 69.0 105.50 141.0 225.00 372.0
Estonia 17.0 188.764706 134.903451 32.0 88.00 139.0 299.00 504.0
Romania 65.0 193.707692 108.336242 12.0 125.00 175.0 235.00 623.0
Belgium 6.0 194.500000 111.460755 101.0 124.50 165.5 205.75 405.0
Slovakia 16.0 211.562500 128.426876 55.0 115.25 179.5 242.25 560.0
Ireland 16.0 213.562500 147.135751 46.0 90.75 181.5 278.75 506.0
France 278.0 231.046763 159.613821 29.0 131.00 192.0 280.75 1117.0
Croatia 17.0 247.058824 141.515666 42.0 167.00 227.0 326.00 591.0
Spain 410.0 250.646341 178.325255 36.0 123.25 205.5 333.75 1167.0
Hungary 36.0 252.888889 142.092883 32.0 162.25 218.0 326.50 572.0
Bulgaria 62.0 261.112903 273.442541 57.0 152.25 205.0 301.75 2151.0
Cyprus 7.0 375.000000 158.991614 166.0 284.00 335.0 471.00 614.0
Italy 154.0 384.246753 392.692238 32.0 154.50 275.0 433.75 2708.0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

LUCAS2018_ORG.csv¶

In [9]:
pd.read_csv('LUCAS-SOIL-2018-v2/LUCAS2018_ORG.csv')
Out[9]:
POINT_ID SURVEY_SOIL_ORG_CULTIVATED SURVEY_SOIL_ORG_DEPTH_P_CM SURVEY_SOIL_ORG_DEPTH_N_CM SURVEY_SOIL_ORG_DEPTH_E_CM SURVEY_SOIL_ORG_DEPTH_S_CM SURVEY_SOIL_ORG_DEPTH_W_CM SURVEY_SOIL_ORG_DEPTH_P_40_CM SURVEY_SOIL_ORG_DEPTH_N_40_CM SURVEY_SOIL_ORG_DEPTH_E_40_CM SURVEY_SOIL_ORG_DEPTH_S_40_CM SURVEY_SOIL_ORG_DEPTH_W_40_CM SURVEY_SOIL_ORG_TAKEN SURVEY_SOIL_ORG_DEPTH_CANDO
0 27602150 1 NaN NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 NaN 1
1 27842394 2 NaN NaN NaN NaN NaN 1.0 1.0 0.0 1.0 0.0 NaN 1
2 27842416 2 18.0 23.0 NaN 21.0 NaN 0.0 0.0 0.0 0.0 0.0 NaN 1
3 27942164 2 23.0 16.0 18.0 20.0 14.0 0.0 0.0 0.0 0.0 0.0 NaN 1
4 28002400 1 NaN NaN NaN NaN NaN 1.0 1.0 0.0 1.0 0.0 NaN 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1045 54203812 2 NaN NaN NaN NaN NaN 1.0 1.0 NaN 1.0 NaN NaN 1
1046 54223834 2 NaN NaN NaN NaN NaN 1.0 1.0 NaN 1.0 NaN NaN 1
1047 54263840 2 NaN NaN NaN NaN NaN 1.0 1.0 1.0 NaN NaN NaN 1
1048 54761846 2 19.0 16.0 NaN 18.0 NaN NaN NaN NaN NaN NaN NaN 1
1049 55061782 2 20.0 15.0 NaN 20.0 NaN NaN NaN NaN NaN NaN NaN 1

1050 rows × 14 columns

Erosion¶

In [10]:
pd.read_csv('LUCAS-SOIL-2018-v2/LUCAS2018_EROSION.csv')
Out[10]:
POINT_ID SURVEY_EROSION_SIGNS SURVEY_EROSION_SHEET SURVEY_EROSION_SHEET_P SURVEY_EROSION_SHEET_N SURVEY_EROSION_SHEET_E SURVEY_EROSION_SHEET_S SURVEY_EROSION_SHEET_W SURVEY_EROSION_SHEET_NR SURVEY_EROSION_SHEET_N_DIST_M SURVEY_EROSION_SHEET_E_DIST_M SURVEY_EROSION_SHEET_S_DIST_M SURVEY_EROSION_SHEET_W_DIST_M SURVEY_EROSION_RILL SURVEY_EROSION_RILL_P SURVEY_EROSION_RILL_N SURVEY_EROSION_RILL_E SURVEY_EROSION_RILL_W SURVEY_EROSION_RILL_S SURVEY_EROSION_RILL_NR SURVEY_EROSION_RILL_N_DIST_M SURVEY_EROSION_RILL_E_DIST_M SURVEY_EROSION_RILL_S_DIST_M SURVEY_EROSION_RILL_W_DIST_M SURVEY_EROSION_GULLY ... SURVEY_EROSION_MASS_S_DIST_M SURVEY_EROSION_MASS_W_DIST_M SURVEY_EROSION_DEP SURVEY_EROSION_DEP_P SURVEY_EROSION_DEP_N SURVEY_EROSION_DEP_E SURVEY_EROSION_DEP_S SURVEY_EROSION_DEP_W SURVEY_EROSION_DEP_NR SURVEY_EROSION_DEP_N_DIST_M SURVEY_EROSION_DEP_E_DIST_M SURVEY_EROSION_DEP_S_DIST_M SURVEY_EROSION_DEP_W_DIST_M SURVEY_EROSION_WIND SURVEY_EROSION_WIND_P SURVEY_EROSION_WIND_N SURVEY_EROSION_WIND_E SURVEY_EROSION_WIND_S SURVEY_EROSION_WIND_W SURVEY_EROSION_WIND_NR SURVEY_EROSION_WIND_N_DIST_M SURVEY_EROSION_WIND_E_DIST_M SURVEY_EROSION_WIND_S_DIST_M SURVEY_EROSION_WIND_W_DIST_M SURVEY_EROSION_RILLGULLY_N
0 37963072 1 NaN 1.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN
1 55762590 1 NaN NaN NaN NaN NaN NaN NaN 25.0 0.0 10.0 0.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
2 64061606 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
3 26761786 1 NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 1.0 0.0 0.0 0.0 NaN 300.0 NaN NaN NaN NaN ... NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN 1.0
4 26881988 1 NaN 1.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 0.0 0.0 0.0 0.0 0.0 NaN NaN NaN NaN NaN NaN 0.0 0.0 1.0 0.0 0.0 NaN NaN 20.0 NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
874 64461632 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 2.0
875 64541646 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
876 64581660 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
877 64621658 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.0 NaN NaN NaN NaN 50.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
878 64661656 1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN

879 rows × 69 columns

2015 data¶

In [11]:
df_2018 = pd.read_csv('LUCAS-SOIL-2018-v2/LUCAS-SOIL-2018.csv')
df_2015 = pd.read_csv('LUCAS2015_topsoildata_20200323/LUCAS_Topsoil_2015_20200323.csv')
In [12]:
df_2018
Out[12]:
Depth POINTID pH_CaCl2 pH_H2O EC OC CaCO3 P N K OC (20-30 cm) CaCO3 (20-30 cm) Ox_Al Ox_Fe NUTS_0 NUTS_1 NUTS_2 NUTS_3 TH_LAT TH_LONG SURVEY_DATE Elev LC LU LC0_Desc LC1_Desc LU1_Desc
0 0-20 cm 47862690 4.1 4.81 8.73 12.4 3 < LOD 1.1 101.9 NaN NaN NaN NaN AT AT1 AT11 AT113 47.150238 16.134212 06-07-18 291 C23 U120 Woodland Other coniferous woodland Forestry
1 0-20 cm 47882704 4.1 4.93 5.06 16.7 1 < LOD 1.3 51.2 NaN NaN NaN NaN AT AT1 AT11 AT113 47.274272 16.175359 06-07-18 373 C21 U120 Woodland Spruce dominated coniferous woodland Forestry
2 0-20 cm 47982688 4.1 4.85 12.53 47.5 1 12.3 3.1 114.8 NaN NaN NaN NaN AT AT1 AT11 AT113 47.123260 16.289693 02-06-18 246 C33 U120 Woodland Other mixed woodland Forestry
3 0-20 cm 48022702 5.5 5.80 21.10 28.1 3 < LOD 2 165.8 NaN NaN NaN NaN AT AT1 AT11 AT113 47.245693 16.357506 06-07-18 305 C22 U120 Woodland Pine dominated coniferous woodland Forestry
4 0-20 cm 48062708 6.1 6.48 10.89 19.4 2 < LOD 2.2 42.1 NaN NaN NaN NaN AT AT1 AT11 AT113 47.296372 16.416782 05-07-18 335 C22 U120 Woodland Pine dominated coniferous woodland Forestry
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
18979 0-20 cm 32643634 6.0 6.13 91.40 51.4 2 92.2 5.3 1036.9 NaN NaN NaN NaN UK UKN UKN1 UKN11 54.713343 -6.563749 24-07-18 50 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
18980 0-20 cm 32703676 4.9 5.14 51.78 73.9 NaN 81.6 6.9 225 NaN NaN NaN NaN UK UKN UKN1 UKN12 55.091488 -6.625119 02-08-18 34 B55 U111 Cropland Temporary grassland Agriculture (excluding fallow land and kitchen...
18981 0-20 cm 32783608 5.5 5.94 22.40 63.7 1 101.9 6.7 569.5 NaN NaN NaN NaN UK UKN UKN1 UKN14 54.515104 -6.259448 18-06-18 50 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
18982 0-20 cm 32783636 5.3 5.90 10.42 38.3 1 7.3 3.1 1907.9 NaN NaN NaN NaN UK UKN UKN1 UKN13 54.759266 -6.358608 05-06-18 122 E20 U370 Grassland Grassland without tree/shrub cover Residential
18983 0-20 cm 33023682 4.7 4.97 141.70 98.7 1 33.7 10.1 231.1 NaN NaN NaN NaN UK UKN UKN1 UKN12 55.208730 -6.156597 28-06-18 143 E20 U111 Grassland Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...

18984 rows × 27 columns

In [13]:
import matplotlib.pyplot as plt
from matplotlib_venn import venn2

venn2([set(df_2015['Point_ID']),set(df_2018['POINTID'])], ('2015', '2018'))
Out[13]:
<matplotlib_venn._common.VennDiagram at 0x1e0faa51ff0>
In [15]:
df_2015
Out[15]:
Point_ID Revisited_point Coarse Clay Sand Silt pH(CaCl2) pH(H2O) EC OC CaCO3 P N K Elevation LC1 LU1 Soil_Stones NUTS_0 NUTS_1 NUTS_2 NUTS_3 LC1_Desc LU1_Desc
0 34103754 No NaN NaN NaN NaN 3.9 3.91 44.20 25.5 0 42.9 2.8 24.6 158 H11 U420 1 UK UKM UKM8 UKM81 Inland marshes Semi-natural and natural areas not in use
1 34443774 No NaN NaN NaN NaN 3.1 3.91 46.40 503.5 0 164.9 19.9 460.3 500 H12 U420 1 UK UKM UKM7 UKM77 Peatbogs Semi-natural and natural areas not in use
2 35163814 No NaN NaN NaN NaN 4.9 5.48 15.85 51.4 0 26.9 4.3 173.2 404 H11 U420 1 UK UKM UKM7 UKM71 Inland marshes Semi-natural and natural areas not in use
3 32323656 No NaN NaN NaN NaN 3.0 3.76 26.90 470.3 0 102.8 16.1 313.0 364 H12 U150 1 UK UKN UKN1 UKN10 Peatbogs OTHER PRIMARY PRODUCTION
4 34463934 No 28.0 10.0 46.0 44.0 3.9 4.04 28.40 43.1 1 6.3 2.3 38.6 315 D20 U111 2 UK UKM UKM6 UKM61 Shrubland without tree cover Agriculture (excluding fallow land and kitchen...
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
21854 45402772 Yes NaN NaN NaN NaN 6.9 7.03 81.00 49.9 8 49.3 5.6 200.1 477 E20 U111 3 AT AT3 AT32 AT323 Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
21855 47722672 Yes NaN NaN NaN NaN 5.7 5.98 22.30 19.4 0 58.0 2.4 244.9 323 E20 U111 1 AT AT2 AT22 AT224 Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
21856 45882618 Yes NaN NaN NaN NaN 6.8 6.99 65.10 53.9 3 16.6 5.9 90.0 630 E20 U111 1 AT AT2 AT21 AT212 Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
21857 45342706 Yes NaN NaN NaN NaN 6.0 6.12 30.70 24.2 0 4.6 3.2 32.7 719 E20 U111 1 AT AT3 AT32 AT322 Grassland without tree/shrub cover Agriculture (excluding fallow land and kitchen...
21858 47742660 Yes NaN NaN NaN NaN 4.2 4.68 7.30 26.0 0 9.6 2.2 162.0 344 C10 U120 1 AT AT2 AT22 AT224 Broadleaved woodland FORESTRY

21859 rows × 24 columns

In [14]:
 
  Cell In[14], line 1
    len(.intersection())
        ^
SyntaxError: invalid syntax